<?php
/*
Module:		quotes
Version:	20071128a-DAT
File:		require.php
*/
function addfact($fact)
{
global $CONFIG;
if (file_exists($CONFIG['fact-file']))
   {
    $fp = fopen($CONFIG['fact-file'],"a");
    fwrite($fp,"\r\n".$fact,strlen($fact)+2);
    fclose($fp);
   }
}

function GetQuote($fullpath)
{
	if (!$file = file($fullpath))
	{
		return "quote not found";
	} else	{
		$rnd = rand(0,count($file)-1);
		$quote = $file[$rnd];
		return $quote;
	}
}



?>
